package game.breeze.assets;

import java.util.HashMap;
import java.util.Map;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.TextureDict;

public class NpcAssets {

	private static Map<String, Texture> npcDic = new HashMap<String, Texture>();

	private NpcAssets() {
	}

	public static Texture loadNpc(String id) {
		if (npcDic.containsKey(id)) {
			return npcDic.get(id);
		}
		Texture texture = TextureDict.loadTexture("data/npc/" + id).get();
		npcDic.put(id, texture);
		return texture;
	}

	public static void unload() {
		npcDic.clear();
	}
}
